package com.example.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.example.mapper.GuanzhuMapper;
import com.example.domain.Guanzhu;
import com.example.service.IGuanzhuService;

/**
 * 用户信息Service业务层处理
 *
 * @author ruoyi
 * @date 2023-04-13
 */
@Service
public class GuanzhuServiceImpl extends ServiceImpl<GuanzhuMapper,Guanzhu> implements IGuanzhuService
{
    @Autowired
    private GuanzhuMapper guanzhuMapper;

    /**
     * 查询用户信息
     *
     * @param userid 用户信息主键
     * @return 用户信息
     */
    @Override
    public Guanzhu selectGuanzhuByUserid(Integer userid)
    {
        return guanzhuMapper.selectGuanzhuByUserid(userid);
    }

    /**
     * 查询用户信息列表
     *
     * @param guanzhu 用户信息
     * @return 用户信息
     */
    @Override
    public List<Guanzhu> selectGuanzhuList(Guanzhu guanzhu)
    {
        return guanzhuMapper.selectGuanzhuList(guanzhu);
    }

    /**
     * 新增用户信息
     *
     * @param guanzhu 用户信息
     * @return 结果
     */
    @Override
    public int insertGuanzhu(Guanzhu guanzhu)
    {

        return guanzhuMapper.insertGuanzhu(guanzhu);
    }

    /**
     * 修改用户信息
     *
     * @param guanzhu 用户信息
     * @return 结果
     */
    @Override
    public int updateGuanzhu(Guanzhu guanzhu)
    {

        return guanzhuMapper.updateGuanzhu(guanzhu);
    }

    /**
     * 批量删除用户信息
     *
     * @param userids 需要删除的用户信息主键
     * @return 结果
     */
    @Override
    public int deleteGuanzhuByUserids(Integer[] userids)
    {
        return guanzhuMapper.deleteGuanzhuByUserids(userids);
    }

    /**
     * 删除用户信息信息
     *
     * @param userid 用户信息主键
     * @return 结果
     */
    @Override
    public int deleteGuanzhuByUserid(Integer userid)
    {
        return guanzhuMapper.deleteGuanzhuByUserid(userid);
    }

    @Override
    public Guanzhu selectuserone(Integer userid) {
        return guanzhuMapper.selectuserone(userid);
    }
}
